package com.asialjim.wechat.official.api.menu;

import com.asialjim.wechat.apiservice.ApiRequest;
import com.asialjim.wechat.official.menu.WeChatMenu;
import com.asialjim.wechat.official.menu.WeChatMenuButton;
import com.asialjim.wechat.official.menu.WeChatMenuMatchRule;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.List;

/**
 * <h1><em>ASIAL JIM JAVA DOC</em></h1><hr/>
 * <h2>CLASS DESCRIPTION <i>[ NAME: CreateOfficialMenu ]</i></h2><strong>
 * <p> create we-chat official account menu
 * </strong><p><p><em>Copyright &copy; Asial Jim Co., LTD</em><hr/>
 *
 * @author Asial Jim &nbsp;&nbsp; <span>Email:<a href="mailto:asialjim@hotmail.com">asialjim@hotmail.com</a> &nbsp;&nbsp; <a href="asialjim@qq.com">asialjim@qq.com</a></span>
 * @version 1.0.0
 * @since 2021/3/15   &nbsp;&nbsp; JDK 8
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
public class CreateOfficialMenuApiRequest extends ApiRequest {

    @Data
    @ToString(callSuper = true)
    @EqualsAndHashCode(callSuper = false)
    public static class CreateMenuBodyParam extends WeChatMenu implements ApiRequest.RequestBodyParam{
        private static final long serialVersionUID = 3833737556458436439L;

        public CreateMenuBodyParam(List<WeChatMenuButton> button, WeChatMenuMatchRule matchRule,Integer menuid){
            super(button, matchRule, menuid);
        }

        public CreateMenuBodyParam(WeChatMenu menu){
            this(menu.getButton(),menu.getMatchRule(),menu.getMenuid());
        }
    }
}
